<page-header title="客户分配" [breadcrumb]="breadcrumb" [action]="action">
    <ng-template #breadcrumb>
        <ql-breadcrumb separator="/">
            <ql-breadcrumb-item>客户管理</ql-breadcrumb-item>
            <ql-breadcrumb-item>客户分配</ql-breadcrumb-item>
        </ql-breadcrumb>
    </ng-template>
    <ng-template #action>
        <ql-button type="primary" [routerLink]="['/customer/my-assign']">创建分配</ql-button>
        <!-- <ql-button type="primary" [routerLink]="['/customer/customer-setrecever']">接收人设置</ql-button> -->
    </ng-template>
</page-header>

<page-container>
    <!-- <data-form label-width="100px">
        <ql-form-item label="分配起始时间">
            <ql-date-picker> </ql-date-picker>
        </ql-form-item>
        <ql-form-item label="分配结束时间">
            <ql-date-picker> </ql-date-picker>
        </ql-form-item>
        <ql-form-item label="接收人姓名">
            <ql-input></ql-input>
        </ql-form-item>
        <ql-form-item label="接收机构">
            <ql-select>
                <ql-option label="建设银行" value="建设银行"></ql-option>
                <ql-option label="农业银行" value="农业银行"></ql-option>
            </ql-select>
        </ql-form-item>
        <ql-form-item label="管护角色">
            <ql-select>
                <ql-option label="主管户" value="主管户"></ql-option>
                <ql-option label="辅管户" value="辅管户主"></ql-option>
            </ql-select>
        </ql-form-item>
    </data-form> -->
    <data-table [model]="assigndata" selection="multiple" [cursor]="cursorService" (cursor-change)="onRefresh()">
        <ql-table-column model-key="recordno" label="机构编号"> </ql-table-column>
        <ql-table-column model-key="orgname" label="机构名称"> </ql-table-column>
        <ql-table-column label="操作" width="150">
            <ng-template #slot let-scope="scope">
                <!-- <ql-button type="text" (click)="queryAssign()">查看</ql-button> -->
                <ql-button type="text" (click)="editAssign(scope)">编辑</ql-button>
                <ql-button type="text" (click)="delAssign(scope)">删除</ql-button>
            </ng-template>
        </ql-table-column>
    </data-table>
    <ng-template #editTemplate>
        <!-- <data-form > -->
        <ql-card>
            <ql-form ql-row gutter="24" class="ql-margin-top" [formGroup]="formGroup" label-width="100px" (submit)="onRefresh()">
                <ql-form-item label="主管机构" ql-col span="12">
                    <ql-input formControlName="orgname" placeholder="请输入内容"></ql-input>
                </ql-form-item>
                <ql-form-item label="主管人名称" ql-col span="12">
                    <ql-input formControlName="managername" placeholder="请输入内容"></ql-input>
                </ql-form-item>
                <ql-form-item label="主管人角色" ql-col span="12">
                    <ql-select [clearable]="true" formControlName="managerroleno">
                        <ql-option *ngFor="let item of dictService.getDict('manager_role')" [label]="item.paramLabel" [value]="item.paramValue"> </ql-option>
                    </ql-select>
                    <!-- <ql-input formControlName="managerroleno" placeholder="请输入内容"></ql-input> -->
                </ql-form-item>
                <ql-form-item ql-col span="24" class="ql-text-right">
                    <ql-button type="primary" size="small" (click)="restFun()">重置</ql-button>
                    <ql-button type="primary" size="small" (click)="saveFun()">保存</ql-button>
                </ql-form-item>
            </ql-form>
        </ql-card>
    </ng-template>
</page-container>
